package the_Crash;

import repast.simphony.space.continuous.ContinuousSpace;
import repast.simphony.space.grid.Grid;
import repast.simphony.space.grid.GridPoint;

//class for representing location information of all simulation entities
public class BaseSimEntity
{
	
	protected Grid<Object> grid;
	
	protected ContinuousSpace<Object> space;

	public BaseSimEntity(GridPoint location, Grid<Object> grid, ContinuousSpace<Object> space) {
		this.location = location;
		this.grid = grid;
		this.space = space;
	}
	
	protected GridPoint location;
	
	public GridPoint getLocation() {
		return location;
	}

	public void moveToLocation() {
		space.moveTo(this, location.getX(), location.getY());
		grid.moveTo(this, location.getX(),location.getY());
	}

	

}
